<?php
$params = array_merge(
    require __DIR__ . '/../../common/config/params.php',
    require __DIR__ . '/../../common/config/params-local.php',
    require __DIR__ . '/params.php',
    require __DIR__ . '/params-local.php'
);

return [
    'id' => 'app-smalldmin',
    'name' => 'Smalldmin',
    'basePath' => dirname(__DIR__),
    'controllerNamespace' => 'smalldmin\controllers',
    'bootstrap' => ['log'],
    'components' => [
        'request' => [
            'csrfParam' => '_csrf-smalldmin',
        ],
        'user' => [
            'identityClass' => 'smalldmin\models\User',
            'enableAutoLogin' => true,
            'identityCookie' => ['name' => '_identity-smalldmin', 'httpOnly' => true],
        ],
        'session' => [
            // this is the name of the session cookie used for login on the smalldmin
            'name' => 'advanced-smalldmin',
        ],
//        'log' => [
//            'traceLevel' => YII_DEBUG ? 3 : 0,
//            'targets' => [
//                [
//                    'class' => 'yii\log\FileTarget',
//                    'levels' => ['error', 'warning'],
//                ],
//            ],
//        ],
        'errorHandler' => [
            'errorAction' => 'site/error',
        ],
//        'urlManager' => [
//            'enablePrettyUrl' => true,
//            'showScriptName' => false,
//            'rules' => [],
//        ],
    ],
    'as access' => [
        'class' => 'yii\filters\AccessControl',
        'except' => [
            'gii/*',
            'debug/*',
            'site/*',
            'public/*',
        ],
        'rules' => [
            [
                'allow' => true,
                'roles' => ['@'],
            ],
        ],
    ],
    'modules' => [],
    'params' => $params,
];
